import request from './request'

// 普通请求，使用默认 headers
// export function getChartData() {
//   return request({
//     url: '/chart/data',
//     method: 'get'
//   })
// }

// // 带自定义 headers 的请求
// export function getMapData(params) {
//   return request({
//     url: '/map/data',
//     method: 'get',
//     params,
//     headers: {
//       'Custom-Header': 'value'
//     }
//   })
// }

// // POST 请求示例
// export function updateData(data) {
//   return request({
//     url: '/update',
//     method: 'post',
//     data,
//     headers: {
//       Authorization: 'Bearer token'
//     }
//   })
// }

// 首页总数量统计
export function indexCount(query) {
  return request({
    url: '/admin/bigScreen/statistics/indexCount',
    method: 'post',
    data: query
  })
}

// 设备状态统计
export function equipmentStatusCount(query) {
  return request({
    url: '/admin/bigScreen/statistics/equipmentStatusCount',
    method: 'post',
    data: query
  })
}

// 实时告警统计
export function realTimeWarningCount(query) {
  return request({
    url: '/admin/bigScreen/statistics/realTimeWarningCount',
    method: 'post',
    data: query
  })
}

// 场站收益排名
export function stationEarningCount(query) {
  return request({
    url: '/admin/bigScreen/statistics/stationEarningCount',
    method: 'post',
    data: query
  })
}

// 设备收益排名
export function equipmentEarningCount(query) {
  return request({
    url: '/admin/bigScreen/statistics/equipmentEarningCount',
    method: 'post',
    data: query
  })
}

// 用户数据统计
export function userCount(query) {
  return request({
    url: '/admin/bigScreen/statistics/userCount',
    method: 'post',
    params: query
  })
}

// 设备收益趋势统计
export function equipmentEarningTrend(query) {
  return request({
    // url: '/admin/statistics/equipmentEarningTrend',
    url: '/admin/bigScreen/statistics/equipmentEarningTrend',
    method: 'post',
    data: query
  })
}

// 地图数据统计
export function getMapData(query) {
  return request({
    url: '/admin/bigScreen/statistics/mapData',
    method: 'post',
    data: query
  })
}
